import request from '@/utils/request'
// 引入数据类型
import type { loginData,loginResponseData,userInfoResponseData} from './model/login'
// 枚举定义接口地址
enum API{
    LOGURL = '/admin/acl/index/login',
    INFO='/admin/acl/index/info',
    LOGOUT= '/admin/acl/index/logout'
}

// 登录接口
export const reqLogin = (data: loginData )=>request.post<any,loginResponseData>(API.LOGURL,data)

// 获取用户信息接口
export const reqUserInfo = () => request.get<any,userInfoResponseData>(API.INFO)

// 退出登录请求
export const reqLogOut = ()=>request.post(API.LOGOUT)